# -*- coding: utf-8 -*
import pandas as pd
import datetime

df = pd.read_csv('data.tsv',sep='\\t')

df['news_posttime']=df['news_posttime'].str[0:13]

res = df.groupby('news_posttime').count()['news_url']

print res
res.to_csv('res.csv'+datetime.datetime.now().strftime('%Y-%m-%d,%H:%M:%S'))
